﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Kooboo.Web.Mvc.Grid;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Kooboo.Web.Mvc;
namespace Kooboo.CMS.FoodOrdering.Areas.Customer.Models
{

    public class LoginModel
    {
        [Required]
        public string Username { get; set; }
        [Required]
        public string Password { get; set; }

        public bool IsAuthenticated { get; set; }

        public bool IsAdmin { get; set; }

        public static LoginModel Current
        {
            get
            {
                var loginModel = (LoginModel)HttpContext.Current.Session["Customer_LoginModel"];
                if (loginModel == null)
                {
                    loginModel = new LoginModel();
                }
                return loginModel;
            }
            set
            {
                HttpContext.Current.Session["Customer_LoginModel"] = value;
            }
        }
    }
}